package org.security.handler.filter.able;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import org.security.jwt.UserInfo;
import org.security.localstore.UserBase;
import org.security.localstore.UserContext;

import java.util.function.Function;

/**
 * @author jt
 * @date 2024/7/21 12:31
 */
public abstract class DefaultLoginVaildAble<T> implements LoginValidAble{

    @Override
    public boolean checkTokenValid(String token) {

        return false;
    }

    @Override
    public boolean usernameAndPasswordValid(String username, String password) {
        return false;
    }

    public UserBase getUserInfo(String username,String password){
        return null;
    }



    //登录成功保存登录信息
    public void saveUserInfo(UserInfo userInfo){
        UserContext.setUser(userInfo);
    }
}
